<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "etc_seller_tiktok_shop".
 *
 * @property int $id
 * @property string $seller_id tk卖家id
 * @property string $shop_code tk店铺编号
 * @property string $shop_name tk店铺名称
 * @property string $shop_icon icon
 * @property string|null $phone phone
 * @property string|null $phone_region_code phone_region_code
 * @property string|null $whatsapp whatsapp
 * @property string|null $whatsapp_region_code whatsapp_region_code
 * @property string|null $email email
 * @property string|null $data 店铺Json数据
 */
class EtcSellerTiktokShop extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'etc_seller_tiktok_shop';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['data'], 'string'],
            [['shop_code'], 'string', 'max' => 50],
            [['seller_id'], 'safe'],
            [['shop_name', 'shop_icon', 'phone', 'phone_region_code', 'whatsapp', 'whatsapp_region_code', 'email'], 'string', 'max' => 300],
            [['shop_code'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'seller_id' => Yii::t('app', 'tk卖家id'),
            'shop_code' => Yii::t('app', 'tk店铺编号'),
            'shop_name' => Yii::t('app', 'tk店铺名称'),
            'shop_icon' => Yii::t('app', 'icon'),
            'phone' => Yii::t('app', 'phone'),
            'phone_region_code' => Yii::t('app', 'phone_region_code'),
            'whatsapp' => Yii::t('app', 'whatsapp'),
            'whatsapp_region_code' => Yii::t('app', 'whatsapp_region_code'),
            'email' => Yii::t('app', 'email'),
            'data' => Yii::t('app', '店铺Json数据'),
        ];
    }
}
